-- GENERATED SPELL FOR [Scarlet Preacher] --


function spell0_28939(pUnit, Event) --@Holy Fury,n/a--
pUnit:FullCastSpellOnTarget(34809,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28939', 534, 1)
end

function spell1_28939(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(15498,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28939', 2500, 1)
end

function spell2_28939(pUnit, Event) --@Turn Undead,n/a--
pUnit:FullCastSpellOnTarget(19725,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28939', 21500, 1)
end

function Sorts_28939(pUnit, Event)
local choix_sorts_28939 = math.random(0, 2)
if choix_sorts_28939 == 0 then
pUnit:RegisterEvent('spell0_28939', 1, 1)
end
if choix_sorts_28939 == 1 then
pUnit:RegisterEvent('spell1_28939', 1, 1)
end
if choix_sorts_28939 == 2 then
pUnit:RegisterEvent('spell2_28939', 1, 1)
end
end

function mob28939_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28939', math.random(1500, 3000), 1)
end

function mob28939_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28939_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28939_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28939, 1, 'mob28939_Action')
RegisterUnitEvent(28939, 2, 'mob28939_Leave')
RegisterUnitEvent(28939, 3, 'mob28939_Kill')
RegisterUnitEvent(28939, 4, 'mob28939_Die')
